﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Templates_Generic_KeyPeopleModule : BaseUserControl
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        dsPosts.SelectData += new EventHandler<Acms.DataControls.SelectEventArgs<Acms.Bll.Post>>(dsPosts_SelectData);
        dlPeople.DataBound += new EventHandler(dlPeople_DataBound);
        
    }

    void dlPeople_DataBound(object sender, EventArgs e)
    {
        if (dlPeople.Items.Length == 0)
        {
            this.Visible = false;
        }
    }

    public event EventHandler<Acms.DataControls.SelectEventArgs<Acms.Bll.Post>> SelectData;

    void dsPosts_SelectData(object sender, Acms.DataControls.SelectEventArgs<Acms.Bll.Post> e)
    {
        if(this.SelectData != null)
        {
            SelectData(this, e);
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
